<?php $this->load->view('header'); ?>
<?php $this->load->view('menus'); ?>

<br /><br />

<form class="feedbackform" action="<?=site_url('account/create');?>" method="post">

<? if( isset($this->error)) { ?>
<div class="error">
	<?=$this->error?>
</div>
<? } ?>

<div class="fieldwrapper">
	<label for="user" class="styled">User:</label>
	<div class="thefield">
		<input type="text" name="user" value="<?=$this->input->post('user')?>" />
	</div>
</div>

<div class="fieldwrapper">
	<label for="password" class="styled">Password:</label>
	<div class="thefield">
		<input name="password" type="password" />
</div>
</div>

<div class="fieldwrapper">
	<label for="password" class="styled">Password Confirm:</label>
	<div class="thefield">
		<input name="password_confirm" type="password" />
</div>
</div>

<div class="fieldwrapper">
	<label for="department_id" class="styled">Department:</label>
	<div class="thefield">
		<select name="department_id">
		<? foreach($this->Departments->fetch_all() as $department) { ?>
			<option <?if($this->input->post('department_id') == $department->department_id) {?>selected="selected"<?}?> 
				value="<?=$department->department_id?>"><?=$department->name?></option>
		<? } ?>
		</select>
	</div>
</div>

<div class="fieldwrapper">
	<label for="first_name" class="styled">First Name:</label>
	<div class="thefield">
		<input type="text" name="first_name" value="<?=$this->input->post('first_name')?>" />
	</div>
</div>

<div class="fieldwrapper">
	<label for="last_name" class="styled">Last Name:</label>
	<div class="thefield">
		<input type="text" name="last_name" value="<?=$this->input->post('last_name')?>" />
	</div>
</div>

<div class="fieldwrapper">
	<label for="email" class="styled">Email address:</label>
	<div class="thefield">
		<input type="text" name="email" value="" size="30" value="<?=$this->input->post('email')?>" /><br />
		<span style="font-size: 80%">*Note: Please make sure it's correctly entered!</span>
	</div>
</div>

<div class="buttonsdiv">
	<input type="submit" name="submit" value="Submit" style="margin-left: 150px;" /> 
</div>

</form>

<?php $this->load->view('footer'); ?>
